//
//  RechargeTypeAlertController.m
//  LianShangBao
//
//  Created by 主事丫环HU on 2020/9/3.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "RechargeTypeAlertController.h"

@interface RechargeTypeAlertController ()
@property (weak, nonatomic) IBOutlet UIButton *weChatPayButton;
@property (weak, nonatomic) IBOutlet UIButton *aliPayButton;

@end

@implementation RechargeTypeAlertController
- (instancetype)init {
    if (self = [super initWithNibName:nil bundle:nil]) {
        self.modalPresentationStyle = UIModalPresentationCustom;
        self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.5];
    [self.weChatPayButton setImageEdgeInsets:UIEdgeInsetsMake(0.0, -20, 0.0, 0.0)];
    [self.aliPayButton setImageEdgeInsets:UIEdgeInsetsMake(0.0, -20, 0.0, 0.0)];
}

- (IBAction)weChatPayButtonClick:(UIButton *)sender {
    if (self.selectedPayTypeClick) {
        self.selectedPayTypeClick(@"0");
    }
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (IBAction)aliPayButtonClick:(UIButton *)sender {
    if (self.selectedPayTypeClick) {
        self.selectedPayTypeClick(@"1");
    }
    [self dismissViewControllerAnimated:YES completion:nil];
}


@end
